package com.component.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.component.domain.base.DataBase;
import lombok.Data;

import java.io.Serializable;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/7/2 21:50
 * @since JDK 1.8
 */
@TableName("m_file")
@Data
public class MFile extends DataBase implements Serializable {

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("filename")
    private String fileName;

    @TableField("filesize")
    private Long fileSize;

    @TableField("filepath")
    private String filePath;

    @TableField("filetype")
    private String fileType;

    @TableField("uid")
    private String uid;

    @TableField("group_id")
    private String groupId;

    @TableField(exist = false)
    private String downloadUrl;

    public String getDownloadUrl(){
        return "/mfile/donload?id="+this.id;
    }



}
